<template>
	<view>
	<view style="margin-bottom: 40rpx;">
		<view class="detail-title">
			<text>当前任务信息</text>
			<view v-if="typeList.length" class="operator-btn"  @click="handleTap('picker')">操作</view>
			<lb-picker ref="picker" @click="handleTap('picker')" 
				mode="selector" :list="typeList" :dataset="{ name: 'label' }" @confirm="handleConfirm"
				@cancel="handleCancel">
			</lb-picker>
		</view>
		<!-- <view class="detail-item">
			<text class="left">任务名称：</text>
			<view class="right-content">{{taskDetail['任务名称']}}</view>
		</view> -->
		<view class="content-item">
			<text class="item-name">项目名称：</text>
			<view class="right-content">{{ taskDetail['项目名称'] }}</view>
		</view>
		<view class="content-item">
			<text class="item-name">角色名称：</text>
			<view class="right-content">{{ taskDetail['角色名称'] }}</view>
		</view>
		<view class="content-item">
			<text class="item-name">任务名称：</text>
			<view class="right-content">{{ taskDetail['任务名称'] }}</view>
		</view>
		<view v-if="taskDetail['任务描述']" class="content-item">
			<text class="item-name">任务描述：</text>
			<view class="right-content">{{ taskDetail['任务描述'] }}</view>
		</view>
		<view class="content-item">
			<text class="item-name">任务优先级：</text>
			<view class="right-content">{{ taskLevelObj[taskDetail['任务优先级']] }}</view>
		</view>
		<view class="content-item">
			<text class="item-name">执行人：</text>
			<view class="right-content">{{ taskDetail['执行人'] }}</view>
		</view>
		<view class="content-item" v-if="taskDetail['抄送人'].length">
			<text class="item-name">抄送人：</text>
			<view class="right-content">{{ taskDetail['抄送人'] }}</view>
		</view>
		<view class="content-item">
			<text class="item-name">开始时间：</text>
			<view class="right-content">{{ taskDetail['开始日期'] | formatTime}}</view>
		</view>
		<view class="content-item">
			<text class="item-name">截止时间：</text>
			<view class="right-content">{{ taskDetail['结束日期'] | formatTime}}</view>
		</view>
		<file-list v-if="taskDetail['图片'][0]" title="示例图片" :idList="taskDetail['图片']" :fileObj="picFile" :length="picLength"></file-list>
	</view>
	<view style="margin-bottom: 40rpx;">
		<view class="detail-title">
			<text>完成结果</text>
		</view>
		<view class="content-item">
			<text class="item-name">完成状态：</text>
			<view class="right-content">{{taskStatusObj[taskDetail['任务状态']] }}</view>
		</view>
		<view v-if="taskDetail['考核评分']" class="content-item">
			<text class="item-name">考核评分：</text>
			<view>{{ taskDetail['考核评分'] }}</view>
		</view>
		<view v-if="taskDetail['完成描述']" class="content-item">
			<text class="item-name">完成描述：</text>
			<view class="right-content">{{ taskDetail['完成描述'] }}</view>
		</view>
		<!-- <file-list v-if="taskDetail['完成附件']" title="完成附件" :idList="taskDetail['完成附件'].split(',')" :fileObj="completeFile" :length="imgLength"></file-list> -->
	</view>
	</view>
</template>

<script>
	import LbPicker from '@/components/lb-picker/index.vue'
	import dayjs from 'dayjs'
	import FileList from '@/components/my-components/fileList'
	export default {
		props: {
			taskDetail: {
				type: Object,
				default:() => {}
			},
			typeList: {
				type: Array,
				default: () => []
			}
		},
		data() {
			return {
				
			}
		}
	}
</script>

<style>
</style>
